<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>dfp_api.zsi_toolkit.MessageHandler</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="dfp_api-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/google-api-dfp-python/">DFP API Python Client Library</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="dfp_api-module.html">Package&nbsp;dfp_api</a> ::
        <a href="dfp_api.zsi_toolkit-module.html">Package&nbsp;zsi_toolkit</a> ::
        Module&nbsp;MessageHandler
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="dfp_api.zsi_toolkit.MessageHandler-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module MessageHandler</h1><p class="nomargin-top"><span class="codelink"><a href="dfp_api.zsi_toolkit.MessageHandler-pysrc.html">source&nbsp;code</a></span></p>
<p>Handler functions for outgoing and incoming messages.</p>

<hr />
<div class="fields">      <p><strong>Author:</strong>
        api.sgrinberg@gmail.com (Stan Grinberg)
      </p>
</div><!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.zsi_toolkit.MessageHandler-module.html#GetServiceConnection" class="summary-sig-name">GetServiceConnection</a>(<span class="summary-sig-arg">headers</span>,
        <span class="summary-sig-arg">config</span>,
        <span class="summary-sig-arg">url</span>,
        <span class="summary-sig-arg">http_proxy</span>,
        <span class="summary-sig-arg">service_name</span>,
        <span class="summary-sig-arg">loc</span>)</span><br />
      Get SOAP service connection.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.zsi_toolkit.MessageHandler-pysrc.html#GetServiceConnection">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.zsi_toolkit.MessageHandler-module.html#SetRequestParams" class="summary-sig-name">SetRequestParams</a>(<span class="summary-sig-arg">request</span>,
        <span class="summary-sig-arg">params</span>)</span><br />
      Set SOAP request parameters.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.zsi_toolkit.MessageHandler-pysrc.html#SetRequestParams">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.zsi_toolkit.MessageHandler-module.html#UnpackResponseAsTuple" class="summary-sig-name">UnpackResponseAsTuple</a>(<span class="summary-sig-arg">response</span>)</span><br />
      Unpack (recursively) SOAP data holder into a Python tuple object.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.zsi_toolkit.MessageHandler-pysrc.html#UnpackResponseAsTuple">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.zsi_toolkit.MessageHandler-module.html#PackRequestAsComplexType" class="summary-sig-name">PackRequestAsComplexType</a>(<span class="summary-sig-arg">request</span>)</span><br />
      Pack (recursively) a Python tuple object into a SOAP data holder.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.zsi_toolkit.MessageHandler-pysrc.html#PackRequestAsComplexType">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dfp_api.zsi_toolkit.MessageHandler-module.html#CustomPackList" class="summary-sig-name">CustomPackList</a>(<span class="summary-sig-arg">lst</span>)</span><br />
      Custom pack a list into a format acceptable by ZSI client.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="dfp_api.zsi_toolkit.MessageHandler-pysrc.html#CustomPackList">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="dfp_api.zsi_toolkit.MessageHandler-module.html#msg" class="summary-name">msg</a> = <code title="'ZSI v%s is not supported. Please use v%s.' %('.'.join(map(str, ZSI.ve\
rsion.Version)), MIN_ZSI_VERSION)">'ZSI v%s is not supported. Please use v%s.' %('.'.join(m<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="GetServiceConnection"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GetServiceConnection</span>(<span class="sig-arg">headers</span>,
        <span class="sig-arg">config</span>,
        <span class="sig-arg">url</span>,
        <span class="sig-arg">http_proxy</span>,
        <span class="sig-arg">service_name</span>,
        <span class="sig-arg">loc</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.zsi_toolkit.MessageHandler-pysrc.html#GetServiceConnection">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Get SOAP service connection.

Args:
  headers: dict dictionary object with populated authentication
           credentials.
  config: dict dictionary object with populated configuration values.
  url: str url of the web service to call.
  http_proxy: str HTTP proxy to use for this API call.
  service_name: str API service name.
  loc: service locator.

Returns:
  instance of SoapBindingSOAP interface with set headers.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="SetRequestParams"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">SetRequestParams</span>(<span class="sig-arg">request</span>,
        <span class="sig-arg">params</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.zsi_toolkit.MessageHandler-pysrc.html#SetRequestParams">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Set SOAP request parameters.

Args:
  request: instance holder of the SOAP request.
  params: list list of parameters to send to the API method.

Returns:
  instance holder of the SOAP request with set parameters.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="UnpackResponseAsTuple"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">UnpackResponseAsTuple</span>(<span class="sig-arg">response</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.zsi_toolkit.MessageHandler-pysrc.html#UnpackResponseAsTuple">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Unpack (recursively) SOAP data holder into a Python tuple object.

 Args:
   response: instance of SOAP data holder object.

Returns:
  tuple unpacked SOAP data holder.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="PackRequestAsComplexType"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">PackRequestAsComplexType</span>(<span class="sig-arg">request</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.zsi_toolkit.MessageHandler-pysrc.html#PackRequestAsComplexType">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Pack (recursively) a Python tuple object into a SOAP data holder.

 Args:
   request: instance of Python tuple object.
   version: str the API version being used.

Returns:
  ZSI.TCcompound.ComplexType packed Python data.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="CustomPackList"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">CustomPackList</span>(<span class="sig-arg">lst</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="dfp_api.zsi_toolkit.MessageHandler-pysrc.html#CustomPackList">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Custom pack a list into a format acceptable by ZSI client.

Args:
  lst: list of Python objects.

Returns:
  Custom packed list of Python objects.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="msg"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">msg</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
'ZSI v%s is not supported. Please use v%s.' %('.'.join(map(str, ZSI.ve<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
rsion.Version)), MIN_ZSI_VERSION)
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="dfp_api-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/google-api-dfp-python/">DFP API Python Client Library</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
